package com.lq.ecoldchain.entity

import android.os.Parcel
import android.os.Parcelable


/*
*2019/1/3 0003  10:41
*function by lq
*/

data class City(
    val cityName: String,
    val id: Int
) : Parcelable {
    constructor(parcel: Parcel) : this(
            parcel.readString(),
            parcel.readInt()) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(cityName)
        parcel.writeInt(id)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<City> {
        override fun createFromParcel(parcel: Parcel): City {
            return City(parcel)
        }

        override fun newArray(size: Int): Array<City?> {
            return arrayOfNulls(size)
        }
    }
}

data class CityInfo(
    val driverId: Int,
    val cityName: String,
    val id: Int,
    val city: Int
)